<h1>Listing intervals</h1>

<table>
  <tr>
    <th>Day</th>
    <th>Starts</th>
    <th>Ends</th>
  </tr>

<% @intervals.each do |interval| %>
  <tr>
    <td><%=h interval.day %></td>
    <td><%=h interval.starts %></td>
    <td><%=h interval.ends %></td>
    <td><%= link_to 'Show', interval %></td>
    <td><%= link_to 'Edit', edit_interval_path(interval) %></td>
    <td><%= link_to 'Destroy', interval, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New interval', new_interval_path %>